package com.lms.desiginmode.factory.model;

import com.lms.desiginmode.factory.model.color.ColorFactory;
import com.lms.desiginmode.factory.model.shape.ShapeFactory;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-12-10 11:32
 * @Description:
 */
public class FactoryProducer {
    private static final String COLOR="COLOR";
    private static final String SHAPE="SHAPE";

    public static AbstractFactory getFactory(String type){
        if (COLOR.equals(type)){
            return new ColorFactory();
        }else if (SHAPE.equals(type)){
            return new ShapeFactory();
        }
        return null;
    }
}
